﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PaceR.Core.Interfaces.Conditionals;
using PaceR.Core.Interfaces;
using PaceR.Core.Utilities;

namespace PaceR.Core.Conditionals
{
    public class SimpleConditionalAction<T> : IConditionalAction<T>
    {
        #region IConditionalAction<T> Members

        public virtual Action<T> Action { get; set; }

        public virtual T ActionArgument { get; set; }

        #endregion

        #region IConditionalOperation Members

        public virtual IResultMessages Execute()
        {
            Action(ActionArgument);
            return ResultObjectFactoryUtil.Factory.GetResultMessagesObject();
        }

        #endregion
    }
}
